﻿using System;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class HatchGradientColors
	{
		private HatchGradientColors(OdGeDoubleArray gradientValues, OdCmColorArray ca)
		{
			this.gradientValues = gradientValues;
			this.colors = ca;
		}

		public OdGeDoubleArray GradientValues
		{
			get
			{
				return this.gradientValues;
			}
		}

		public OdCmColorArray Colors
		{
			get
			{
				return this.colors;
			}
		}

		public IntPtr Marshal()
		{
			IntPtr intPtr = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(IntPtr.Size * 2);
			System.Runtime.InteropServices.Marshal.WriteIntPtr(intPtr, OdCmColorArray.getCPtr(this.Colors).Handle);
			System.Runtime.InteropServices.Marshal.WriteIntPtr(intPtr, 4, OdGeDoubleArray.getCPtr(this.GradientValues).Handle);
			return intPtr;
		}

		private OdGeDoubleArray gradientValues;

		private OdCmColorArray colors;
	}
}
